package com.totem.base.enums;

import lombok.Getter;

import java.util.Objects;

@Getter
public enum MemberLevelEnum {
    V0(0),
    V1(1),
    V2(2),
    V3(3),
    V4(4),
    V5(5),
    V6(6);
    private final int code;

    MemberLevelEnum(int code){
        this.code = code;
    }

    public static MemberLevelEnum byCode(int code) {
        for (MemberLevelEnum e: MemberLevelEnum.values()) {
            if (code==e.code) {
                return e;
            }
        }
        return null;
    }
}
